1

2

3

Start

1

2

3

Reset all

1

2

3

\text{Step4. Stick or switch}

\text{Step2. Choose one door}

Show me the histogram

\text{Step1. Start the game}

\text{Step3. Let Monty open a door}

Randomly

Intentionally(he always chooses a goat's)

First you select the rule of the game. How Monty chooses a door?

Open

Suppose you are on a game show, and you  are given the choice of three doors. 
Behind one door is a car. Behind the others, a goat. 
You pick a door, say number 1, and the host, who knows what is behind the doors, 
opens another door, say number 3,  which has a goat. 
He then says to you, Do you want to pick door number 2?
  Is it to your advantage to switch your choice?

explanation of the game

first: 0
car = 1
dice: {1, 2, 3}
hint: 0
op2: 1
op3: 1
op1: 1
goats = Remove(dice, {car})
door2 = createSquare((2, 3))
n: 0
G2: ((Element[goats, 2] * 2) - 1.75, 3.26)
door3 = createSquare((4, 3))
door1 = createSquare((0, 3))
G2r: G2 + (1, 0)
G1: ((Element[goats, 1] * 2) - 1.75, 3.26)
G1r: G1 + (1, 0)
C1: ((car * 2) - 1.9, 3.4)
C1r: C1 + (1.3, 0)
bingo: 0
flag: 0
ratio = If(n ≟ 0, 0, bingo / n)
car0 = RandomElement(dice)
ratios: {}
yscale = 2 (slider from 1 to 2.6, step 0.1)
xscale = 0.2 (slider from 0.01 to 0.5, step 0.01)
histry = Histogram((xscale * Append[0, Sequence[n]]), (yscale * ratios))
histshow = true
yticks: {Sequence[Segment[(-0.3, (k * yscale)), (((n + 0.5) * xscale), (k * yscale))], k, 0.2, 1, 0.2], Sequence[Text[(k * 0.2), (-0.3, ((yscale * k) * 0.2))], k, 0, 5]}
xyaxes: {Vector[(0, 0), (0, (1.1 * yscale))], Vector[(0, 0), (((1.1 * n) * xscale), 0)], Text["n", (((n + 0.2) * xscale), 0)], Text["ratio", (0, (1.1 * yscale))]}
B1 = (5.995814205218878, 1.5477156696581418)
B1r: B1 + (1.2, 0)
time = 0 (slider from 0 to 6, step 0.1)
cover, a, b, c, d = Polygon(B1, B1r, Rotate[B1, -1.5708, B1r] + (0, 0.1), Rotate[B1r, 1.5708, B1] + (0, 0.1))
randomly = false
intentionally = true
O = (6.4892700512005215, 3.8426769850965536)
rouletteCircle = Circle(O, 0.5)
P = Point(rouletteCircle)
Bs = Sequence(Rotate[P, (π / 6 * (k - 1)), O], k, 1, 13)
rouletteseg = Sequence(Segment[Element[Bs, k], Element[Bs, k + 6]], k, 1, 6)
rouletteBlue = Sequence(Polygon[Element[Bs, k], Element[Bs, k + 1], O], k, 1, 12, 3)
rouletteRed = Sequence(Polygon[Element[Bs, k], Element[Bs, k + 1], O], k, 2, 11, 3)
rouletteGreen = Sequence(Polygon[Element[Bs, k], Element[Bs, k + 1], O], k, 3, 12, 3)
text4: "\text{Success rate}=\frac{" + (LaTeX[bingo]) + "}{" + (LaTeX[n]) + "}=" + (LaTeX[ratio]) + ""
monty = If(intentionally, Remove[dice, {first, car}], Remove[dice, {first}])
hint0 = RandomElement(monty)
hinttime: 0
bingos: {}
e = true

Tool: createSquare
gate[ <Point> ]
Input: A
Output: poly

B: A + (1.5, 0)
C: B + (0, 1.5)
D: A + (0, 1.5)
poly = Polygon({A, B, C, D})